<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h3 {
            display: none;
        }
    </style>
</head>
<body>

    <h3 class="noLogin">
        <a href="./04login.html">登录</a>
        <a href="./03reg.html">注册</a>
    </h3>

    <h3 class="login">xx</h3>


    <script src="../js/tools.js"></script>

    <script>

        // 判断是否登录  LOGIN_USER
        const res = getCookie('LOGIN_USER') ;
        if(res) {
            getEle('.login').style.display = 'block' ;
            getEle('.login').innerHTML = res ;
        } else {
            getEle('.noLogin').style.display = 'block' ;
        }


    </script>
    
</body>
</html>